<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>待停售商品列表</title>
<script type="text/javascript" src="/fuman/js/product.js"></script>


<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/leftmenu.tpl'}}
<div class="centercontent tables">
  <div class="pageheader notab">
    <h1 class="pagetitle">待停售商品列表</h1>
    
  <span class="pagedesc">1、商品上架五个月，并且五个月内无销量（ 填0表示不设条件） <br>&nbsp;&nbsp;&nbsp;&nbsp; 2、产品维护人员标为暂停销售的产品全部显示<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、标停售后不会再次上架，关闭产品所有流程，如果有库存，将走清仓流程<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4、非正常SKU，如 TEST、自动创建等，建议批量删除
  </span>
    <div class="menulist">
    <ul class="profile_summary">
    {{if $managers || in_array('286',$showpower)}}   <li class="current"> <a href="/datareport/haltsales_check" target="_blank"><span>待停售列表</span></a></li>{{/if}}
      </ul>
  </div>
     </div>
  <!--pageheader-->
     <div>
   		<div style="float:left">{{if $managers || in_array('284',$showpower)}}  &nbsp;&nbsp; <a href="javascript:void(0)" onClick="MergeProduct()" class="btn btn2 btn_help"><span>申请停售</span>
        </a>
        
        {{/if}}
        {{if $managers}}
        	 &nbsp;&nbsp; <a href="javascript:void(0)" onClick="batchdelgoods(1)" class="btn btn2 btn_help"><span>批量删除</span></a>
        {{/if}} 
        </div>
         <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
   </div>
  <div id="contentwrapper" class="contentwrapper"> 
    <!--搜索栏-->
    <form class="stdform stdform2" method="get" action="/datareport/haltsales">
      <div class="tableoptions">  商品分类
      <select name="bigclassID" id="bigclassID" class="selection" style="width:100px;" onChange="getsecondcate()">
                    <option value="">请选择</option>
                    {{foreach from=$categorylist item=res key=key}}
                    <option value="{{$res.id}}" {{if $bigclassID== $res.id}} selected{{/if}}>{{$res.cate_name}}</option>
                    {{/foreach}}
                  </select>
                  
           <span id="showsecondcate"></span>
           
            &nbsp;&nbsp; &nbsp;&nbsp;
       			 <select name="iskey" id="iskey" class="selection" style="width:100px;">
                    <option value="1" {{if $iskey==1}} selected{{/if}}>关键词包含</option>
                     <option value="2" {{if $iskey==2}} selected{{/if}}>关键词不包含</option>
                  </select> <input type="text" name="other" id="other" class="width100" placeholder="主SKU、商品名" value="{{$other}}" />
        供货商
       <select name="supplier" id="supplier" class="selection" >
                    <option value="">请选择</option>
                    {{foreach from=$factory item=res key=key}}
                    <option value="{{$res.id}}" {{if $res.id == $supplier}} selected{{/if}}>{{$res.name}}</option>
                    {{/foreach}}
                  
                  </select>   
      &nbsp;&nbsp; 商品上架: <input type="text" name="sm" id="sm" class="width50" value="{{$sm}}" />个月并且<input type="text" name="dm" id="dm" class="width50" value="{{$dm}}" />月内<font color="#FF0000">无
       <select name="orderstatus" id="orderstatus" class="selection" style="width:100px;">
                    <option value="5" {{if $orderstatus==5}} selected{{/if}}>已完成</option>
                     <option value="8" {{if $orderstatus==8}} selected{{/if}}>所有</option>
                  </select>
      状态订单</font> &nbsp;&nbsp;
      &nbsp;&nbsp;有库存&nbsp;<input name="istock" {{if $istock}} checked{{/if}} type="checkbox" value="1">&nbsp;&nbsp;
      &nbsp;&nbsp;包含暂停销售&nbsp;<input name="isstop" {{if $isstop}} checked{{/if}} type="checkbox" value="1">&nbsp;&nbsp;
      
       维护人员:
        <select name="developer" id="developer" class="selection select2_group" style="width:100px;" >
            <option value="0">请选择</option>
            {{foreach from=$userlist item=res key=key}}
            <option value="{{$res}}" {{if $developer eq $res}} selected{{/if}}>{{$res}}</option>
            {{/foreach}}
        </select>
        <button class="btn btn_orange btn_search radius50">Search</button>
        
      </div>
    </form>
    <!--搜索栏结束-->
    
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
      <colgroup>
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      <col class="con0" />
      <col class="con1" />
      </colgroup>
      <thead>
        <tr>
          <th class="head0"><a onClick="allSelect('ppid[]')">全选</a></th>
         
          <th class="head0">商品编号</th>
          <th class="head1">商品名称</th>
          <th class="head0">录入时间</th>
          <th class="head0">维护人员</th>
          <th class="head1">库存 </th>
        
        </tr>
      </thead>
      <tbody>
      
      {{foreach from=$list item=li key=key}}
      <tr>
        <td><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.p_parent_id}}"  /></td>
        <td><a href="/product/productlist?other={{$li.p_parent_sku}}" target="_blank">{{$li.p_parent_sku}}</a></td>
        <td>
      	{{if $li.p_sale_status==4}}<font color="Blue"><B>【停售】</B></font>{{/if}}
       {{if $li.p_sale_status==6}}<font color="Blue"><B>【暂停销售】</B></font>{{/if}}
        {{$li.p_parent_name}}</td>
        <td>{{$li.g_updatetime}}</td>
        <td>{{$li.p_checkman}}</td>
        <td class="center">{{$li.stock}}</td>
   
      </tr>
      {{/foreach}}
      
    </table>
    <div class="page">{{$pageList}}</div>
    <br />
    <br />
  </div>
</div>
<!--bodywrapper-->
<script language="javascript">
function MergeProduct()
{
	var str = selectallpro();
	if(str){
		$("#haltsalessku").val(str);
		$('#MergeProductform').modal('show');
	}
}

</script>
<!-- 模态框（Modal） 结算-->
<form action="/datareport/ajaxbutton?op=savehaltsales"  method="post" name="uctform" id="uctform" >
<input type="hidden" name="haltsalessku" id="haltsalessku">
  <div class="modal fade" id="MergeProductform" tabindex="-1" role="dialog" aria-labelledby="sMergeProductform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sMergeProductform">申请停售 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
              <td style="line-height:25px;">关于停售商品说明：<br>
              1、停售商品不会再次上架销售，永久关闭。 <br>
              2、如果遇到有库存的商品，自动进入待清仓流程，仓库核实库存之后，提出清仓申请报表，清仓完成自动标停售<br>
              3、申请停售后由负责人审核。
              <br>
              
              
             
             </td>
            </tr>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmit('uctform','MergeProductform')"> 提交 </button>
<!--            <button type="submit" name="spa">保存</button>
-->          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
</form>
<!-- 模态框（Modal）合并商品 -->
</body>
</html>